package com.plian.system;

import com.plian.spring.SpringUtil;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Import;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@SpringBootApplication(exclude = {SecurityAutoConfiguration.class})
@EnableTransactionManagement
@ServletComponentScan
@MapperScan(basePackages = {"com.**.dao.*","org.**.dao","com.**.mapper.*", "com.plian.flow.mapper"})
@ComponentScan(basePackages = {"org.flowable.ui.*", "com.plian.system.*","com.plian.flow.*"})
@Import(SpringUtil.class)
//开启缓存
@EnableCaching
//@EnableAsync
@EnableScheduling
@EnableFeignClients
@EnableConfigurationProperties
public class SystemApplication {
    public static void main(String[] args) {
        SpringApplication.run(SystemApplication.class, args);
    }
    //为了打包springboot项目




    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        // jasyptPassword

        return builder.sources(this.getClass());
    }
}
